]> dgit.raspbian.org Git - linux-4.9.git/commit
dwc_otg: make nak_holdoff work as intended with empty queues
authorP33M <p33m@github.com>
Thu, 27 Apr 2017 15:24:34 +0000 (16:24 +0100)
committerpopcornmix <popcornmix@gmail.com>
Fri, 28 Apr 2017 12:56:17 +0000 (13:56 +0100)
commit5ca413b90055603649b66e1854e2577933c995ac
tree2653ec19b6bd9c85865ad5de63c44b731d033c07
parentef3b440e0e4d9ca70060483aa33d5b1201ceceb8
dwc_otg: make nak_holdoff work as intended with empty queues

If URBs reading from non-periodic split endpoints were dequeued and
the last transfer from the endpoint was a NAK handshake, the resulting
qh->nak_frame value was stale which would result in unnecessarily long
polling intervals for the first subsequent transfer with a fresh URB.

Fixup qh->nak_frame in dwc_otg_hcd_urb_dequeue and also guard against
a case where a single URB is submitted to the endpoint, a NAK was
received on the transfer immediately prior to receiving data and the
device subsequently resubmits another URB past the qh->nak_frame interval.

Fixes https://github.com/raspberrypi/linux/issues/1709
drivers/usb/host/dwc_otg/dwc_otg_hcd.c
drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c